<script>
  class People {
    constructor(name) {
      this.name = name;
    }
    eat() {
      console.log(`${this.name}正在吃东西`);
    }
  }
  class Student extends People {
    constructor(name, number) {
      super(name);
      this.number = number;
    }
    info() {
      console.log(`学生信息:   ${this.name}    ${this.number}`);
    }
  }
  class Teacher extends People {
    constructor(name, major) {
      super(name);
      this.major = major;
    }
    teach() {
      console.log(`${this.name}  教  ${this.major}`);
    }
  }
  let djw = new Student("djw", 99);
  let you = new Teacher("鱿鱼须", "Vue3");
  console.log(Student.prototype);
  console.log(Student.__proto__);
  console.log(Teacher.__proto__);
  console.log("----------------------");
  console.log("djw", djw);
  console.log("you", you);
  djw.info();
  you.teach();
  djw.eat();
</script>
